﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;

namespace QuanLyDuAn.DataAccess
{
    class dbAccess
    {
        SqlConnection con = new SqlConnection();
        public SqlConnection GetConnect()
        {
            String conStr = ConfigurationManager.ConnectionStrings["conStr"].ConnectionString;
            con = new SqlConnection(conStr);
            return con;
        }
        public void CloseConnect(SqlConnection conn)
        {
            conn.Close();
        }
        public void OpenConnect(SqlConnection conn)
        {
            conn.Open();
        }
    }
}
